package com.westa.smallshop.util;

import android.content.Context;

/**
 * Created by dune on 15/12/23.
 */
public class TokenUtil {

    public static final String TAG = "token";
    private static String token;

    public static void initToken(Context context) {

        token = (String) UserSPUtils.getUserInfo(context, TAG, "");
    }

    public static void removeToken(Context context) {

        UserSPUtils.removeUserInfo(context, TAG);
        token = null;
    }

    public static String getToken() {
        return token;
    }

    public static void setToken(String mToken) {

        token = mToken;
    }

    public static String getToken(Context context) {
        return (String) UserSPUtils.getUserInfo(context, TAG, "");
    }
}
